/**
 * Created by PanJiaChen on 16/11/18.
 */

/**
 * @param {string} path
 * @returns {Boolean}
 */
export function isExternal(path) {
  return /^(https?:|mailto:|tel:)/.test(path);
}

/**
 * 用户名校验
 * @param {string} str
 * @returns {Boolean}
 */
export function validUsername(str) {
  return str.length > 0;
}

/**
 * 密码校验
 * @param {*} password
 * @returns
 */
export function validPassword(password) {
  return password.length >= 8;
}
